<?php
namespace app\admin\loglic;

class Auth
{
    public function fields($data)
    {
        return [
            'op_id' => [
                'order'           => 1,
                'type'            => 'hidden',
                'value'           => $data['op_id'],
                'data-filter'     => false,
                'data-visible'    => true,
                'data-width'      => '80',
                'data-width-unit' => 'px',
                'data-sortable'   => true,
            ],
            'op_name' => [
                'order'           => 2,
                'type'            => 'text',
                'value'           => $data['op_name'],
                'required'        => true,
                'title'           => lang('auth_roles'),
                'placeholder'     => lang('auth_roles_placeholder'),
                'data-title'      => lang('auth_roles'),
                'data-align'      => 'left',
                'data-filter'     => false,
                'data-visible'    => true,
                'data-width'      => 150,
            ],
            'auth_roles_tips' => [
                'order'           => 11,
                'data-title'      => lang('auth_roles_tips'),
                'data-align'      => 'left',
                'data-visible'    => true,
                'data-width'      => 150,
            ],
             'op_value' => [
                'order'           => 12,
                'type'            => 'text',
                'value'           => $data['op_value'],
                'required'        => true,
                'title'           => lang('auth_caps'),
                'placeholder'     => lang('auth_caps_placeholder'),
                'data-filter'     => false,
                'data-visible'    => true,
                'data-align'      => 'left',
                'data-title'      => lang('auth_caps'),
            ],
            'auth_caps_tips' => [
                'order'           => 13,
                'data-title'      => lang('auth_caps_tips'),
                'data-visible'    => true,
                'data-align'      => 'left',
            ],
            'op_status' => [
                'order'           => 14,
                'type'            => 'select',
                'value'           => DcEmpty($data['op_status'],'normal'),
                'option'          => ['normal'=>lang('normal'),'hidden'=>lang('hidden')],
                'data-filter'     => true,
                'data-visible'    => false,
            ],
            'op_status_text' => [
                'order'           => 15,
                'data-title'      => lang('op_status'),
                'data-visible'    => true,
                'data-width'      => 100,
            ],
            'op_action' => [
                'order'           => 16,
                'type'            => 'hidden',
                'value'           => 'system',
            ],
            'op_controll' => [
                'order'           => 17,
                'type'            => 'hidden',
                'value'           => 'auth',
            ],
            'op_module' => [
                'order'           => 18,
                'type'            => 'hidden',
                'value'           => DcEmpty($data['op_module'],'common'),
                'data-filter'     => false,
                'data-visible'    => true,
                'data-width'      => 100,
                'data-formatter'  => 'daicuo.admin.table.formatter',
            ],
            'op_order' => [
                'order'           => 19,
                'type'            => 'hidden',
                'value'           => intval($data['op_order']),
                'data-filter'     => false,
                'data-visible'    => false,
            ],
            'op_autoload' => [
                'order'           => 20,
                'type'            => 'hidden',
                'value'           => 'no',
            ],
        ];
    }
}